package com.netctoss.account.action;

import com.netctoss.DAOFactory;
import com.netctoss.account.dao.IAccountDAO;
import com.netctoss.account.entity.Account;
import com.netctoss.exception.DAOException;


public class AddAccountAction {
	private Account account;
	public String execute(){
		IAccountDAO dao = DAOFactory.getAccountDAO();
			try {
				dao.addAccount(account);
			} catch (DAOException e) {
				e.printStackTrace();
				return "error";
			}
			return "success";
	}
	public Account getAccount() {
		return account;
	}
	public void setAccount(Account account) {
		this.account = account;
	}

}
